#include "logform.h"
#include <QTextEdit>
#include <QHBoxLayout>
#include <QPainter>
#include <QStyleOption>

LogForm::LogForm(QWidget *parent) :
    QWidget(parent)
{
    setObjectName("LogForm");

    m_pTextEdit=new QTextEdit;
    m_pTextEdit->setObjectName("m_pTextEdit");
    m_pTextEdit->setReadOnly(true);

    QHBoxLayout *layout=new QHBoxLayout;
    layout->setMargin(5);
    layout->addWidget(m_pTextEdit);
    setLayout(layout);

    for(int i=0;i<10;++i)
    {
        m_pTextEdit->append("LogForm::LogForm(QWidget *parent) --");
    }
}

LogForm::~LogForm()
{
}

void LogForm::paintEvent(QPaintEvent *event)
{
    Q_UNUSED(event);

    QStyleOption opt;
    opt.init(this);
    QPainter p(this);
    style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
